package com.ruoyi.reply.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.reply.mapper.TbReplyMapper;
import com.ruoyi.reply.domain.TbReply;
import com.ruoyi.reply.service.ITbReplyService;

/**
 * 答辩Service业务层处理
 * 
 * @author sun
 * @date 2023-01-30
 */
@Service
public class TbReplyServiceImpl implements ITbReplyService 
{
    @Autowired
    private TbReplyMapper tbReplyMapper;

    /**
     * 查询答辩
     * 
     * @param replyId 答辩主键
     * @return 答辩
     */
    @Override
    public TbReply selectTbReplyByReplyId(Integer replyId)
    {
        return tbReplyMapper.selectTbReplyByReplyId(replyId);
    }

    /**
     * 查询答辩列表
     * 
     * @param tbReply 答辩
     * @return 答辩
     */
    @Override
    public List<TbReply> selectTbReplyList(TbReply tbReply)
    {
        return tbReplyMapper.selectTbReplyList(tbReply);
    }

    /**
     * 新增答辩
     * 
     * @param tbReply 答辩
     * @return 结果
     */
    @Override
    public int insertTbReply(TbReply tbReply)
    {
        tbReply.setCreateTime(DateUtils.getNowDate());
        return tbReplyMapper.insertTbReply(tbReply);
    }

    /**
     * 修改答辩
     * 
     * @param tbReply 答辩
     * @return 结果
     */
    @Override
    public int updateTbReply(TbReply tbReply)
    {
        tbReply.setUpdateTime(DateUtils.getNowDate());
        return tbReplyMapper.updateTbReply(tbReply);
    }

    /**
     * 批量删除答辩
     * 
     * @param replyIds 需要删除的答辩主键
     * @return 结果
     */
    @Override
    public int deleteTbReplyByReplyIds(Integer[] replyIds)
    {
        return tbReplyMapper.deleteTbReplyByReplyIds(replyIds);
    }

    /**
     * 删除答辩信息
     * 
     * @param replyId 答辩主键
     * @return 结果
     */
    @Override
    public int deleteTbReplyByReplyId(Integer replyId)
    {
        return tbReplyMapper.deleteTbReplyByReplyId(replyId);
    }
}
